A NAND-type flash memory includes memory cells disposed in a matrix configuration, a sense amplifier for sensing data written in the memory cells, and the like.